<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('序列管理')" />
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="dept-form">
					<div class="select-list">
						<ul>
							<li>
								命名空间：<input type="text" name="namespace"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.treeTable.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
                
            <div class="btn-group-sm" id="toolbar" role="group">
		        <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="leaf:segment:add">
                    <i class="fa fa-plus"></i> 新增
                </a>
	        </div>
       		 <div class="col-sm-12 select-table table-striped">
	            <table id="bootstrap-tree-table"></table>
	        </div>
	    </div>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		var addFlag = [[${@permission.hasPermi('leaf:segment:add')}]];
		var datas = [[${@dict.getType('sys_normal_disable')}]];
		var prefix = ctx + "leaf/segment"

		$(function() {
		    var options = {
		        code: "id",
		        parentCode: "parentId",
		        uniqueId: "id",
		        url: prefix + "/list",
		        createUrl: prefix + "/add/{id}",
		        modalName: "序列",
		        columns: [
					{
						field: 'id',
						title: '编号',
						align: "center",
						width: "30"
					},
                 {
		            field: 'namespace',
		            title: '命名空间',
					 align: "center"
		        },
					{
						field: 'leafVal',
						title: '序列值',
						align: "center"
					},
		        {
		            field: 'step',
		            title: '步长',
					align: "center"
		        },
		        {
		            field: 'createTime',
		            title: '创建时间',
					align: "center"
		        },
					{
						field: 'updateTime',
						title: '更新时间',
						align: "center"
					},
		        ]
		    };
		    $.treeTable.init(options);
		});
	</script>
</body>
</html>